package com.ghpt.service.impl;
import com.ghpt.mapper.JiZhongMapper;
import com.ghpt.pojo.JiZhong;
import com.ghpt.service.JiZhongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class JiZhongServiceImpl implements JiZhongService {
    @Autowired
    private JiZhongMapper jiZhongMapper;

    @Override
    public JiZhong findJiZhongById(Long id) {
        if (id != null) {
            return jiZhongMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(JiZhong jiZhong) {
        return jiZhongMapper.updateById(jiZhong);//更新成功为1否则为0
    }
}
